// import _inject from 'aotoo-inject'
// let inject = _inject()
// inject.css([
//   'https://at.alicdn.com/t/font_2218644_e2lr06id8q.css'
// ])

const data = [
  {title: 'icon-arrow_down', content: "\e616"},
  {title: 'icon-danxuan01', content: "\e7bf"},
  {title: 'icon-danxuan02', content: "\e7c0"},
  {title: 'icon-fuxuan01', content: "\e7bd"},
  {title: 'icon-fuxuan02', content: "\e7be"},
  {title: 'icon-cha-xiaohao', content: "\e7ab"},
  {title: 'icon-jiazai', content: "\e609"},
  {title: 'icon-sousuo', content: "\e7b0"},
  {title: 'icon-yiwenjieda', content: "\e7b3"},
  {title: 'icon-tishishuoming', content: "\e7b6"},
  {title: 'icon-chenggongtishi', content: "\e7b7"},
  {title: 'icon-cuowutishi', content: "\e7b8"},
  {title: 'icon-shuomingtishi', content: "\e7b9"},
  {title: 'icon-xiaochengxu1', content: "\e63e"},
  {title: 'icon-saoma', content: "\e608"},
  {title: 'icon-qq1', content: "\e614"},
  {title: 'icon-github', content: "\e677"},
  {title: 'icon-arrow_up', content: "\e617"},
  {title: 'icon-saui', content: "\e605"},
  {title: 'icon-nav', content: "\e66b"},
  {title: 'icon-riqi', content: "\e644"},
  {title: 'icon-jianhao', content: "\e602"},
  {title: 'icon-guanbi', content: "\e607"},
  {title: 'icon-xiala', content: "\e74e"},
  {title: 'icon-jiahao', content: "\e611"},
  {title: 'icon-arrow_right', content: "\e618"},
  {title: 'icon-arrow_left', content: "\e615"},
]

const adapter = (data) => {
  return data.map(item => {
    return {
      title: item.content +' / '+ item.title,
      itemClass: item.title
    }
  })
}


function template(state, props) {
  // let md = requireMarkdown(state.file)
  let mdContent = ui_item({
    title: {
      title: '图标',
      itemClass: 'pages-title-lg'
    },
    '@list': {
      data: adapter(data),
      itemClass: 'icon-xx',
      listClass: 'flex-row-wrap'
    }
  })
  return <mdContent.UI />
}

export default function(Pager) {
  return Pager({
    template,
    data: {},
    
    // onLoad(options){
    //   console.log(options, '======= onLoad options');
    //   let $file = this.getData().file
    //   let file = options.file
    //   if (file && file !== $file) {
    //     this.setData({ file })
    //   }
    // },

    // onUnload(){
    //   console.log('====== unload a');
    // },
    
    onReady(){

    }
  })
}